package com.yyh;

public class Test1 {
    public static void main(String[] args) {
        //创建一个计算器对象
        Calculator calculator = new Calculator();
        //创建成员变量
        calculator.brand = "得力";
        calculator.size = "14.5寸";
        /*//访问成员变量
        System.out.println(calculator.brand);
        System.out.println(calculator.size);*/
        //访问成员方法
        System.out.println(calculator.add(2,4,5));
        System.out.println(calculator.sub(2,4,5));
        calculator.show();
    }
}
